﻿using System;
using System.Collections.Generic;
using System.Text;
using DepInnerTask.Common.Interface;
using DepInnerTask.Common.Entity;
using IBatisNet.DataMapper;
using Common.Service;
using System.Collections;
using Common.Logging;
using DepInner;

namespace DepInnerTask.Logic
{
    class UpLoadFileLogic:IUpLoadFile
    {
        /// <summary>
        /// 获取上传文件
        /// </summary>
        /// <param name="where"></param>
        /// <returns></returns>
        public IList GetList(string where)
        {
            Hashtable table = new Hashtable();
            table.Add("GUID", where);
            IList list = DataHelper.Instance().GetList("UpLoadFile_GetListByID", table);
            return list;
        }
        public IList GetList1(string where)
        {
            Hashtable table = new Hashtable();
            table.Add("UPLOAD_FILE_ID", where);
            IList list = DataHelper.Instance().GetList("UpLoadFile_GetListByID1", table);
            return list;
        }
        public IList GetList()
        {
            Hashtable table = new Hashtable();
            //table.Add("UPLOAD_BY", where);
            IList list = DataHelper.Instance().GetList("UpLoadFile_GetList", table);
            return list;
        }
        public UpLoadFileEntity Get(string taskId)
        {
            return DataHelper.Instance().Get<UpLoadFileEntity>("TaskLogic_Get", taskId);
        }

        public void Insert(UpLoadFileEntity entity)
        {
            DataHelper.Instance().Insert("InsertUpLoadFile", entity);
        }

        public void Update(UpLoadFileEntity entity)
        {
            DataHelper.Instance().Update("TaskLogic_Update", entity);
        }

        public bool Exists(string taskId)
        {
            throw new NotImplementedException();
        }

        public void Delete(string taskId)
        {
            DataHelper.Instance().Delete("DeleteUpLoadFile", taskId);
        }
    }
}
